<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>管理员个人信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="<%=basePath%>layui/css/layui.css" media="all">
  
<script src="<%=basePath%>/js/jquery-3.2.1.min.js"></script>
</head>
<body>
<form class="layui-form">
	<div class="layui-form-item" id="list_page" style="margin-top:30px;">
	    <div class="layui-inline">
		    <label class="layui-form-label">姓名</label>
		    <div class="layui-input-inline">
            <input id="adminName" value="${sessionScope.admin.adminName}" disabled="disabled" type="text" name="tno" placeholder="请输入标题" autocomplete="off" class="layui-input" style="width:200px">
			</div>
		</div>
	   <div class="layui-form-item">
          <label class="layui-form-label">原密码</label>
          <div class="layui-input-inline">
            <input id="oldPsw" type="password" name="oldPsw" required="" lay-verify="required" lay-vertype="tips" placeholder="请输入原密码" autocomplete="off" class="layui-input">
          </div>
        </div>
        
         <div class="layui-form-item">
          <label class="layui-form-label">新密码</label>
          <div class="layui-input-inline">
            <input id="psw1" onchange="checkpwd()" type="password" name="psw1" required="" lay-verify="required" lay-vertype="tips" placeholder="请输入新密码" autocomplete="off" class="layui-input">
          </div>
        </div>
        
         <div class="layui-form-item">
          <label class="layui-form-label">确认密码</label>
          <div class="layui-input-inline">
            <input id="psw2" onchange="checkpwd()" type="password" name="psw2" required="" lay-verify="required" lay-vertype="tips" placeholder="请再次输入新密码" autocomplete="off" class="layui-input">
          	<div id="msg" style="color:red;"></div>
          </div>
        </div>
		<div class="layui-form-item">
          <div class="layui-input-block">
            <button id="btn" class="layui-btn btn-submit" lay-filter="reg" lay-submit="">提交</button>
          </div>
        </div>
 	 </div>
</form>
<script type="text/javascript">
	function checkpwd(){
		var p1=window.document.aform.psw1.value;//获取密码框的值
		var p2=window.document.aform.psw2.value;//获取重新输入的密码值
		
		if(p1!=p2){//判断两次输入的值是否一致，不一致则显示错误信息
			window.document.getElementById("msg").innerHTML="两次输入密码不一致，请重新输入";//在div显示错误信息
		}else{
			window.document.getElementById("msg").innerHTML="";
	}
}
</script>	
</body>
<script src="<%=basePath%>/js/vue.min.js"></script>
<script src="<%=basePath%>/layui/layui.js" charset="utf-8"></script>
</html>